#ifdef __cplusplus
extern "C"{
#endif

#ifndef __NETWORK_H__
#define __NETWORK_H__

/* Both readn and writen are deprecated and will be removed.  They are not
   suitable for use with non-blocking file descriptors.
 */
int xs_net_socket(int __family, int __type, int __pro);
int xs_net_bind(int __f, const struct sockaddr *__sa,  socklen_t __sal);
int xs_net_listen(int __f, int __max);
int xs_net_connect(u_int16_t __port, const char * __ip);
int xs_net_send(int __f, void *__p, int __s);
int xs_net_recv(int __f, char *__p, int __s);
int xs_close_socket(int __f);

#endif /* __NETWORK_H__ */

#ifdef __cplusplus
}
#endif
